package today.rocky.boot.component;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Service;
import today.rocky.boot.OrderPaidEvent;

/**
 * @version 1.0
 * @vlog:
 * @description:
 * @author: Rocky RocketListener
 * @createDate: 2020/7/4 20:23
 */
@Slf4j
@Service
@RocketMQMessageListener(topic = "test-topic-2", consumerGroup = "my-consumer_test-topic-2")
public class RocketListener implements RocketMQListener<OrderPaidEvent> {
	@Override
	public void onMessage(OrderPaidEvent orderPaidEvent) {
		log.info("received orderPaidEvent: {}", orderPaidEvent);
	}
}